package com.leyu.mall.service.cms.impl;
import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.leyu.mall.dao.cms.CmsShopConfigMapper;
import com.leyu.mall.domain.cms.CmsShopConfig;
import com.leyu.mall.service.cms.ICmsShopConfigService;

 


@Service
@Transactional(rollbackFor=Exception.class)
public class CmsShopConfigServiceImpl implements ICmsShopConfigService{
	
	
	@Resource
	private CmsShopConfigMapper cmsShopConfigMapper;
	
	
	public   CmsShopConfig getCmsShopConfig(Long id) throws  Exception{
	return this.cmsShopConfigMapper.getCmsShopConfig(id);
	}
	
 
	 public  void addCmsShopConfig(CmsShopConfig record)throws  Exception{
		 if(record.getShopConfigId()==null){
			 this.cmsShopConfigMapper.addCmsShopConfig(record);
		 }else {
			 this.cmsShopConfigMapper.updateCmsShopConfig(record);
		 }
	 }
	  
	  
}
